<?php
namespace Home\Model;
use Think\Model;
class memberModel extends Model{
    /*检测登录信息*/
	function checkLogin($name,$password){
        $data["username"]=$name;
        $data["password"]=$password;
        $res=M('member')->where($data)->select();

	return $res;
	}
/*会员注册*/
    public function regist($username,$password,$email,$tel){

        $data["username"]=$username;
        $data["password"]=$password;
        $data["email"]=$email;
        $data["mobile_phone"]=$tel;
        $res=M("member")->data($data)->add();
        return $res;
    }
}